﻿using System;

namespace InkFx.WinControl.Theme
{
    /// <summary>
    /// 风格样式 特性
    /// </summary>
    public class ThemeAttribute : Attribute
    {
        private string m_Index = string.Empty;
        private string m_Name = string.Empty;

        /// <summary>
        /// 
        /// </summary>
        public string Index
        {
            get { return m_Index; }
            set { m_Index = (string.IsNullOrEmpty(value) || string.IsNullOrEmpty(value.Trim())) ? "999" : value; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string Name
        {
            get { return m_Name; }
            set { m_Name = (string.IsNullOrEmpty(value) || string.IsNullOrEmpty(value.Trim())) ? "Default" : value; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string Category
        {
            get { return string.Format("{0} {1}", Index, Name); }
        }


        /// <summary>
        /// 构造函数
        /// </summary>
        public ThemeAttribute() { }
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="index">Type: string</param>
        /// <param name="name">Type: string</param>
        public ThemeAttribute(string index, string name) { this.Index = index; this.Name = name; }
    }

    /// <summary>
    /// 一个参考特性, 不用做程序运行, 用来标记 风格样式的图片 指向的磁盘图片的参考路径
    /// </summary>
    public class SkinImagePathAttribute : Attribute
    {
        private string m_Path = string.Empty;
        /// <summary>
        /// 
        /// </summary>
        public string Path
        {
            get { return m_Path; }
            set { m_Path = (value ?? string.Empty).Trim(); }
        }

        /// <summary>
        /// 构造函数
        /// </summary>
        public SkinImagePathAttribute() { }
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="path">Type: string</param>
        public SkinImagePathAttribute(string path) { this.Path = path; }
    }
}
